package com.ica.model.facade;

import com.ica.model.command.AbstractCommand;

/**
 * @author   Hector
 */
public class CommandFacadeMockImpl extends GenericFacadeImpl<AbstractCommand> implements CommandFacadeInterface {
	
	/**
	 * @uml.property  name="instance"
	 * @uml.associationEnd  
	 */
	private static CommandFacadeMockImpl instance = null;
	
	/**
	 * @return
	 * @uml.property  name="instance"
	 */
	public static CommandFacadeMockImpl getInstance() {		
		if (instance==null) {
			instance = new CommandFacadeMockImpl();
		}
		return instance;
	}
	
	@Override
	public void replaceElement(long id, AbstractCommand element) {		
		elements.remove(id);
		element.setId(id);
		elements.put(id, element);
	}
}
